class ComicShotVO {
	
	public static TYPE_ANIM:string = "anim"
	public static TYPE_DIALOG:string = "dialog"
	public static TYPE_SELECT:string = "select"
	
	public name:string;
	public next:string;
	public selectNext:string[];
	public type:string;
	public skipEnable:boolean;
	public autoPlay:boolean;
	
	public nextShots:ComicShotVO[];
	public scene:ComicSceneVO;

	public dialogComplete:boolean = false;
	public playComplete:boolean = false;
	public saying:boolean = false;

	public selectIndex:number = -1;
	

	private _config:ShotConfig;

	public constructor(config:ShotConfig) {
		this._config = config;

		this.name = config.name;
		this.next = config.next;
		this.selectNext = config.selectNext;
		this.type = config.type;
		this.skipEnable = config.skipEnable;
		this.autoPlay = config.autoPlay;

	}
	public get nextShot():ComicShotVO | null
	{
		switch(this.type)
		{
			case ComicShotVO.TYPE_ANIM:
			case ComicShotVO.TYPE_DIALOG:
				if(this.nextShots && this.nextShots.length > 0)
				{
					return this.nextShots[0];
				}
				break;
			case ComicShotVO.TYPE_SELECT:
				if(this.nextShots && this.nextShots.length > 0
				   && this.selectIndex >= 0)
				{
					return this.nextShots[this.selectIndex]
				}
		}
		return null;
	}
	public clear():void
	{
		this.dialogComplete = false;
		this.playComplete = false;
		this.saying = false;
	}
}